/*
 * 作者：老贺
 * 功能：专利统计的action
 * 日期：2015-05-24
 */
package admin.action.statistics;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import admin.service.member.LeaderServiceAdmin;
import leader.service.LeaderService;
import teacher.bean.Teacher;

public class PatentStatisticsAction {
	List<Map<Integer,Integer>> counts=	new ArrayList<Map<Integer,Integer>>();
	
	public List<Map<Integer, Integer>> getCounts() {
		return counts;
	}

	public void setCounts(List<Map<Integer, Integer>> counts) {
		this.counts = counts;
	}

	public String execute()
	{
	
		LeaderServiceAdmin ls=new LeaderServiceAdmin();
		for(int i=0;i<4;i++)
		{
			Map map=new HashMap();
			
			for(int j=1;j<4;j++)
			{
				
				Teacher tea=new Teacher();
				tea.setDirection(i);
				map.put(j,ls.getCountOfPatentClass(tea, j-1));
				
			}
			
			map.put(0, i);
			counts.add(map);
		}
	
		return "succ";
	}
	
	

}
